package com.hsnn.medstgmini.pro.plan.model;

/**
 * @category 用户类型
 * @author CCL
 *
 */
public enum ExecuteType {

	manual(1, "手动执行"), auto(2, "自动执行");

	private int key;
	private String value;

	private ExecuteType(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public static String getName(int key) {
		for (ExecuteType ut : ExecuteType.values()) {
			if (ut.key == key) {
				return ut.value;
			}
		}
		return "";
	}

	public static ExecuteType getUserType(int key) {
		for (ExecuteType ut : ExecuteType.values()) {
			if (ut.key == key) {
				return ut;
			}
		}
		return null;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

}
